package com.mr.apigateway;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.cloud.netflix.zuul.filters.ZuulProperties;
import org.springframework.stereotype.Component;

/**
 * Class: ZuulConfig
 * User (作者):MRui
 * TODO (描述)：zuul动态更新
 * Date 2018-11-14 22:47
 */
@Component
public class ZuulConfig {

    //动态路由（也可以将此写到启动文件里）
    @ConfigurationProperties("zuul")
    @RefreshScope
    public ZuulProperties zuulProperties(){
        return new ZuulProperties();
    }
}
